package com.coder4j.log.service.impl;

import com.coder4j.log.entity.BizLogEntity;
import com.coder4j.log.mapper.BizLogMapper;
import com.coder4j.log.vo.BizLogQuery;
import com.coder4j.log.vo.BizLogVO;
import com.coder4j.log.service.IBizLogService;
import com.coder4j.starter.web.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.BeanUtils;

import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;

/**
 * 业务日志
 * @author keller
 * @date 2024-05-07 18:18:56
 */
@Service
@Slf4j
public class BizLogServiceImpl extends BaseServiceImpl<BizLogMapper,BizLogEntity,BizLogVO> implements IBizLogService{

    @Resource
    private BizLogMapper mapper;

    @Override
    public BizLogVO entity2Vo(BizLogEntity entity) {
        BizLogVO vo = new BizLogVO();
        BeanUtils.copyProperties(entity,vo);
        return vo;
    }

    @Override
    public BizLogEntity vo2Entity(BizLogVO vo) {
        BizLogEntity entity = new BizLogEntity();
        BeanUtils.copyProperties(vo, entity);
        return entity;
    }
}
